<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateHousePurchaseTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('house_purchase', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('house_id')->comment('房源id');
            $table->string('house_logo')->default('')->comment('房源图片');
            $table->string('house_tittle')->default('')->comment('团购标题');
            $table->string('house_address')->default('')->comment('楼盘地址');
            $table->date('start_date')->nullable()->comment('开始时间');
            $table->date('stop_date')->nullable()->comment('结束时间');
            $table->string('group_introduce')->default('')->comment('团购介绍');
            $table->string('broker_id')->default('')->comment('经纪人id');
            $table->integer('number')->comment('团购人数');
            $table->string('state')->default('')->comment('0是未开启1是开启');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('house_purchase');
    }
}
